import { http } from '@/utils/http'

export const getOpportunityListAPI = (data: any) => {
  return http<any[]>({
    method: 'GET',
    url: '/mobile/customer/opportunity/list',
    data,
  })
}

export const getOpportunityAPI = (opportunityId: number | string) => {
  return http<any[]>({
    method: 'GET',
    url: '/mobile/customer/opportunity/' + opportunityId,
  })
}

export const deleteOpportunityAPI = (opportunityId: number | string) => {
  return http<any[]>({
    method: 'DELETE',
    url: '/mobile/customer/opportunity/' + opportunityId,
  })
}

export const postOpportunityAPI = (data: any) => {
  return http<any[]>({
    method: 'POST',
    url: '/mobile/customer/opportunity',
    data,
  })
}

export const putOpportunityAPI = (data: any) => {
  return http<any[]>({
    method: 'PUT',
    url: '/mobile/customer/opportunity',
    data,
  })
}
